From 036ee7a68bd358be62e5ac36e8bdebe5b28b5b78 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 20 Nov 2015 20:58:42 -0500 Subject: [PATCH] inspector: Always underline at least one char Empty underlines are hard to make out. Since we get somewhat unreliable section information from the CSS parser, we just make sure that we always underline at least one character. --- gtk/inspector/css-editor.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/inspector/css-editor.c b/gtk/inspector/css-editor.c index 714e4f9b91..d5547841f0 100644 --- a/gtk/inspector/css-editor.c +++ b/gtk/inspector/css-editor.c @@ -337,6 +337,9 @@ show_parsing_error (GtkCssProvider *provider, else tag_name = "error"; + if (gtk_text_iter_equal (&css_error->start, &css_error->end)) + gtk_text_iter_forward_char (&css_error->end); + gtk_text_buffer_apply_tag_by_name (buffer, tag_name, &css_error->start, &css_error->end); ce->priv->errors = g_list_prepend (ce->priv->errors, css_error); -- 2.30.2